package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.EleBillamountMapper;
import com.rzl.expense.expense.domain.EleBillamount;
import com.rzl.expense.expense.service.IEleBillamountService;

/**
 * 电费缴费汇总Service业务层处理
 * 
 * @author expense
 * @date 2024-11-28
 */
@Service
public class EleBillamountServiceImpl implements IEleBillamountService 
{
    @Autowired
    private EleBillamountMapper eleBillamountMapper;

    /**
     * 查询电费缴费汇总
     * 
     * @param billamountId 电费缴费汇总主键
     * @return 电费缴费汇总
     */
    @Override
    public EleBillamount selectEleBillamountByBillamountId(String billamountId)
    {
        return eleBillamountMapper.selectEleBillamountByBillamountId(billamountId);
    }

    /**
     * 查询电费缴费汇总列表
     * 
     * @param eleBillamount 电费缴费汇总
     * @return 电费缴费汇总
     */
    @Override
    public List<EleBillamount> selectEleBillamountList(EleBillamount eleBillamount)
    {
        return eleBillamountMapper.selectEleBillamountList(eleBillamount);
    }

    /**
     * 新增电费缴费汇总
     * 
     * @param eleBillamount 电费缴费汇总
     * @return 结果
     */
    @Override
    public int insertEleBillamount(EleBillamount eleBillamount)
    {
        eleBillamount.setCreateTime(DateUtils.getNowDate());
        return eleBillamountMapper.insertEleBillamount(eleBillamount);
    }

    /**
     * 修改电费缴费汇总
     * 
     * @param eleBillamount 电费缴费汇总
     * @return 结果
     */
    @Override
    public int updateEleBillamount(EleBillamount eleBillamount)
    {
        eleBillamount.setUpdateTime(DateUtils.getNowDate());
        return eleBillamountMapper.updateEleBillamount(eleBillamount);
    }

    /**
     * 批量删除电费缴费汇总
     * 
     * @param billamountIds 需要删除的电费缴费汇总主键
     * @return 结果
     */
    @Override
    public int deleteEleBillamountByBillamountIds(String[] billamountIds)
    {
        return eleBillamountMapper.deleteEleBillamountByBillamountIds(billamountIds);
    }

    /**
     * 删除电费缴费汇总信息
     * 
     * @param billamountId 电费缴费汇总主键
     * @return 结果
     */
    @Override
    public int deleteEleBillamount()
    {
        return eleBillamountMapper.deleteEleBillamount();
    }




    @Override
    public void batchEleBillamount(List<EleBillamount> list)
    {

         eleBillamountMapper.batchEleBillamount(list);
    }


}
